release of colsearch plugin for DataTables#145
Open
zepernick wants to merge 4 commits intoDataTables:masterfrom
Open
release of colsearch plugin for DataTables#145zepernick wants to merge 4 commits intoDataTables:masterfrom
zepernick wants to merge 4 commits intoDataTables:masterfrom
Conversation
Collaborator
|
This looks great - thanks for the PR! I haven't tried it out yet, and will do so before I pull it in, but just to check, are you happy for it to be released under the MIT license (like the rest of the software in this repo)? Also, could you add a copyright notice to the code for yourself / company / whatever, just to note it as your own work! :-) |
Author
|
Thanks! I am good with the MIT license. I added it to the top of the code and marked me as the author :-) |
…ot carry the right number of cells. Bug Fix: Added a listener for columns being hidden so that the plugin could adjust the search bar at the time of hiding.
Author
|
this is now broken with the release of responsive 2.0. I am working on an update, but it is also going to require a small update to responsive to add a new event. Just a heads up for anyone who might be trying to use this! Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a plugin I wrote that will add inputs / selects to the grids header or footer for searching. It will automatically fire the search for the columns on the keyup for inputs and change for selects.
There is a delay on the keyup on the input that utilizes the
searchDelayoption on the DataTable. The default is 500ms if it has not been specified. The search fields are automatically omitted for a column ifcolumns.searchableis FALSE.Here are the plugin options:
placement- String: "head' or "foot" (default "head")select- Array of objects: define which columns should search via dropdown. Object properties specified below.name- int or string: column index,columns.dataas a string,columns.nameoptions- Array of Strings or a functionfunction(select): The function will be responsible for appending the<option/>elements to the select passed in. The select it a jQuery object. The string array can specify the value and text of the option by using a|in the String "avalue|Text To DIsplay". The plugin will assign the String to the value and text of the option if the pipe is omitted.header- boolean: True to generate an option header in the select. (default true)placeholders- boolean: True generates a placeholder attribute on the inputs using the column header in the table.controlClass- String: Classes to apply to the controls. (default "form-control" for Bootstrap)Plugin can be invoked by doing: